//
//  StatusTopView.m
//  CMJWeibo
//
//  Created by BH on 16/1/4.
//
//

#import "StatusTopView.h"
#import "StatusFrame.h"
#import "StatusOriginalView.h"
#import "StatusRepostedView.h"
#import "UIImage+MJ.h"

@interface StatusTopView ()
//原微博view
@property(nonatomic,strong)StatusOriginalView *originalView;
//转发微博view
@property(nonatomic,strong)StatusRepostedView *repostedView;

@end

@implementation StatusTopView

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.userInteractionEnabled = YES;
        self.image = [UIImage resizableImage:@"common_card_top_background"];
        
        //添加原微博view
        StatusOriginalView *originalV = [[StatusOriginalView alloc] init];
        [self addSubview:originalV];
        self.originalView = originalV;
        
        //添加转发微博view
        StatusRepostedView *repostedV = [[StatusRepostedView alloc] init];
        [self addSubview:repostedV];
        self.repostedView = repostedV;
    }
    return self;
}

-(void)setStatusF:(StatusFrame *)statusF
{
    _statusF = statusF;
    
    self.frame = statusF.topViewF;
    self.originalView.statusF = statusF;
    self.repostedView.repostStatusF = statusF;
}

@end
